<?php

namespace App\Repository\Models;


use Illuminate\Database\Eloquent\Model;

class MenuPermission extends Model
{
    /**
     * 限制读取字段
     *
     * @var array
     */

    protected $fillable=['permission_id','menu_id'];
    protected $guarded = [];

    protected $hidden = ['pivot'];

    /**
     * 设置模型表名
     *
     * @var string
     */
    protected $table = "menu_permission";



    public function menu()
    {
        return $this->hasOne(Menu::class,'id','menu_id');
    }
}
